const path = require("path")
const fs = require("fs")
module.exports = {
    appConfig(req, resp) {
        resp.sendFile(path.resolve("./application/" + req.query.packageName + "/config.json"));
    },
    appMain(req, resp) {
        let { main } = JSON.parse(fs.readFileSync(path.resolve("./application/" + req.query.packageName + "/config.json")))
        resp.sendFile(path.resolve("./application/" + req.query.packageName + "/" + main));
    }
}